import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;

@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class})
public class Application {
    public static void main(String[] args) {
        SpringApplication.run(Application.class, args);

//
//        Thread thread = new Thread(new Runnable() {
//            @Override
//            public void run() {
//                consumer.subscribe(Arrays.asList(topicName));
//                boolean tag = true;
//                while (tag){
//                    ConsumerRecords<Object, Object> records = consumer.poll(100);
//                    for (ConsumerRecord<Object, Object> record : records) {
//                        System.out.println(record.offset() + "  " + record.key().toString() + "  " + record.value());
//                        // return new Greeting(record.key().toString() + "  " + record.value());
////                        try {
////                            WsMessageThread wsMessageThread = new WsMessageThread(wsTemplate.getMessageChannel(), wsTemplate.getMessageConverter());
////                            new Thread(wsMessageThread).start();
////                            template.convertAndSend("/topic/greetings",record.value());
////                        } catch (Exception e) {
////                            e.printStackTrace();
////                        }
//                    }
//                }
//            }
//        });
//        thread.start();
    }
}
